// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CatalogruleGroupWebsite generated by hbm2java
 */
@Entity
@Table(name = "catalogrule_group_website", catalog = "magento")
public class CatalogruleGroupWebsite implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private CatalogruleGroupWebsiteId id;
	private CoreWebsite coreWebsite;
	private Catalogrule catalogrule;
	private CustomerGroup customerGroup;

	public CatalogruleGroupWebsite() {
	}

	public CatalogruleGroupWebsite(CatalogruleGroupWebsiteId id,
			CoreWebsite coreWebsite, Catalogrule catalogrule,
			CustomerGroup customerGroup) {
		this.id = id;
		this.coreWebsite = coreWebsite;
		this.catalogrule = catalogrule;
		this.customerGroup = customerGroup;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "ruleId", column = @Column(name = "rule_id", nullable = false)),
			@AttributeOverride(name = "customerGroupId", column = @Column(name = "customer_group_id", nullable = false)),
			@AttributeOverride(name = "websiteId", column = @Column(name = "website_id", nullable = false)) })
	public CatalogruleGroupWebsiteId getId() {
		return this.id;
	}

	public void setId(CatalogruleGroupWebsiteId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "website_id", nullable = false, insertable = false, updatable = false)
	public CoreWebsite getCoreWebsite() {
		return this.coreWebsite;
	}

	public void setCoreWebsite(CoreWebsite coreWebsite) {
		this.coreWebsite = coreWebsite;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "rule_id", nullable = false, insertable = false, updatable = false)
	public Catalogrule getCatalogrule() {
		return this.catalogrule;
	}

	public void setCatalogrule(Catalogrule catalogrule) {
		this.catalogrule = catalogrule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_group_id", nullable = false, insertable = false, updatable = false)
	public CustomerGroup getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(CustomerGroup customerGroup) {
		this.customerGroup = customerGroup;
	}

}
